﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;

namespace sample1
{
    [Table("model_field_config", Schema = "demo")]
    public class ModelFieldConfig
    {
        [Key]
        public int Id { get; set; }
        public string Model { get; set; }

        [Column(TypeName = "jsonb")]
        public Dictionary<string, FieldConfig> Config { get; set; }

        [Column(TypeName = "jsonb")]
        public JsonElement Json { get; set; }
    }

    public class FieldConfig
    {
        public string Name { get; set; }

        public string Type { get; set; }

        public string Title { get; set; }
    }
}
